#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

bool check(ll k)
{
  ll t=k/2;
  for(ll y=1;y<=t;++y)
  {
    ll mysum=0;
    for(ll x=y;x<=t+1;)
    {
      if(mysum==k)
      {
        return true;
      }
      mysum+=x;
      x++;
      if(mysum>k)
        break;
    }
  }
  return false;
}

int main()
{
  ll n=0;
  cin>>n;
  vector<ll> ret(n);
  ll tmp=0;
  for(ll i=0;i<n;++i)
  {
    cin>>ret[i];
  }
  for(ll i=0;i<n;++i)
  {
    if(!check(ret[i]))
    {
      tmp++;
    }
  }
  cout<<tmp;
  return 0;
}
